package com.itheima.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 信息-种类关系实体
 * @TableName message_link_kind
 */
@TableName(value ="message_link_kind")
@Data
public class MessageLinkKind implements Serializable {
    private static final long serialVersionUID = 3337038630198921255L;
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 信息id
     */
    @ApiModelProperty(value = "信息id")
    @TableField(value = "message_id")
    private Integer messageId;

    /**
     * 种类id
     */
    @ApiModelProperty(value = "种类id")
    @TableField(value = "kind")
    private Integer kind;

    /**
     * 发布时间
     */
    @ApiModelProperty(value = "发布时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @TableField(value = "deleted_at")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableLogic
    private LocalDateTime deletedAt;

}
